package com.bosssoft.trainee.nontax.service;

import com.bosssoft.trainee.nontax.entity.dto.DepartmentDTO;
import com.bosssoft.trainee.nontax.entity.po.DepartmentPO;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author sct
 * @since 2022-06-15
 */
public interface DepartmentService extends IService<DepartmentPO> {
    /**
     * 查询部门列表
     * @param departmentDTO
     * @return
     */
    List<DepartmentDTO> findDepartmentList(DepartmentDTO departmentDTO);

    /**
     * 查询上级部门列表
     * @return
     */
    List<DepartmentDTO> findParentDepartment();

    /**
     * 判断部门下是否有子部门
     * @param id
     * @return
     */
    boolean hasChildrenOfDepartment(Long id);

    /**
     * 判断部门下是否存在用户
     * @param id
     * @return
     */
    boolean hasUserOfDepartment(Long id);
}
